import 'package:bxultimate/app/theme/app_theme.dart';
import 'package:bxultimate/app/theme/gaps.dart';
import 'package:bxultimate/data/store/config_store.dart';
import 'package:bxultimate/domain/home/home_data_dto.dart';
import 'package:bxultimate/widgets/mk_load_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';

class AppShopActivity extends StatefulWidget {
  final ShopActivity shopActivity;

  const AppShopActivity({super.key, required this.shopActivity});

  @override
  State<AppShopActivity> createState() => _AppShopActivityState();
}

class _AppShopActivityState extends State<AppShopActivity> {
  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.all(8),
      margin: const EdgeInsets.symmetric(vertical: 4),
      decoration: BoxDecoration(
        color: Colors.white,
        borderRadius: BorderRadius.circular(8),
      ),
      child: Column(
        children: [
          Row(
            mainAxisAlignment: MainAxisAlignment.start,
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              ClipRRect(
                borderRadius: BorderRadius.circular(4),
                child: MkLoadImage(
                  ConfigStore.to.baseFileUrl + widget.shopActivity.shopImg,
                  width: 70,
                ),
              ),
              Gaps.hGap8,
              Column(
                mainAxisAlignment: MainAxisAlignment.start,
                crossAxisAlignment:CrossAxisAlignment.start,
                children: [
                  Text('${widget.shopActivity.shopName}',style: TextStyle(fontSize: 14,fontWeight: FontWeight.bold),),
                  Gaps.vGap4,
                  Text('${widget.shopActivity.description}',style: TextStyle(fontSize: 12),)
                ],
              ),

            ],
          ),
          Gaps.vGap8,
          HtmlWidget('${widget.shopActivity.info}',textStyle: TextStyle(fontSize: 12),)


        ],
      ),
    );
  }
}
